package com.ruoyi.grape.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.grape.mapper.GrapePlotMapper;
import com.ruoyi.grape.domain.GrapePlot;
import com.ruoyi.grape.service.IGrapePlotService;

/**
 * 地块信息Service业务层处理
 * 
 * @author ld
 * @date 2023-11-18
 */
@Service
public class GrapePlotServiceImpl implements IGrapePlotService 
{
    @Autowired
    private GrapePlotMapper grapePlotMapper;

    /**
     * 查询地块信息
     * 
     * @param plotId 地块信息主键
     * @return 地块信息
     */
    @Override
    public GrapePlot selectGrapePlotByPlotId(Long plotId)
    {
        return grapePlotMapper.selectGrapePlotByPlotId(plotId);
    }

    /**
     * 查询地块信息列表
     * 
     * @param grapePlot 地块信息
     * @return 地块信息
     */
    @Override
    public List<GrapePlot> selectGrapePlotList(GrapePlot grapePlot)
    {
        return grapePlotMapper.selectGrapePlotList(grapePlot);
    }

    /**
     * 新增地块信息
     * 
     * @param grapePlot 地块信息
     * @return 结果
     */
    @Override
    public int insertGrapePlot(GrapePlot grapePlot)
    {
        return grapePlotMapper.insertGrapePlot(grapePlot);
    }

    /**
     * 修改地块信息
     * 
     * @param grapePlot 地块信息
     * @return 结果
     */
    @Override
    public int updateGrapePlot(GrapePlot grapePlot)
    {
        return grapePlotMapper.updateGrapePlot(grapePlot);
    }

    /**
     * 批量删除地块信息
     * 
     * @param plotIds 需要删除的地块信息主键
     * @return 结果
     */
    @Override
    public int deleteGrapePlotByPlotIds(Long[] plotIds)
    {
        return grapePlotMapper.deleteGrapePlotByPlotIds(plotIds);
    }

    /**
     * 删除地块信息信息
     * 
     * @param plotId 地块信息主键
     * @return 结果
     */
    @Override
    public int deleteGrapePlotByPlotId(Long plotId)
    {
        return grapePlotMapper.deleteGrapePlotByPlotId(plotId);
    }
}
